<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="com.lmpop.trade.ti_newschannel.*" %> 
<jsp:useBean id="bean" class="com.lmpop.frame.util.RandomID" scope="page" /> 
<%
	request.setCharacterEncoding("UTF-8");
	 
	String news_id = bean.GenTradeId();
	 
	String user_id="";	
	if( session.getAttribute("session_user_id") != null ){
		user_id = session.getAttribute("session_user_id").toString();
	}
  Ti_newschannelInfo newschannelinfo = new Ti_newschannelInfo();
	   
	String select = newschannelinfo.getChannelByLevel("1");
%>
<html>
  <head>
    <title>新增资讯 </title>
	 	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	  <script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ti_newschannelInfo.js'></script>
 		<script type="text/javascript" src="news.js"></script>
 		<script src="/js/jquery.js" type="text/javascript"></script>
 		<script src="iColorPicker.js" type="text/javascript"></script>
 		<script>
 			 jQuery.noConflict();
 	 	</script>
	</head>

<body>
	<h1>新增资讯</h1>
	
	<form action="/doTradeReg.do" method="post" name="addForm" id="addForm" target="_self">
  
	
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		<tr>
			<td align="right" width="15%">资讯标题<font color="red">*</font></td>
				<td colspan="3">
					<input name="title" id="title" type="text" size="60" maxLength="50"/>
					<input name="title_color" id="title_color" type="text" value="#707070" size="10"  class="iColorPicker" title="请选择标题颜色" />				
				</td>
		</tr>

		<tr>
			<td align="right" width="15%">
				所属栏目<font color="red">*</font>			
		  </td>
				<td colspan="3">
				  <select name="sort1" id="sort1" style="width:130px" onChange="setSecondCh(this.value);">
            <option value="">请选择</option>
            <%=select%>
          </select>
					<select name="sort2" id="sort2" style="width:130px;display:none" onChange="setTherdCh(this.value);">
						<option value="">请选择</option>
					</select>								
					<select name="sort3" id="sort3" style="width:130px;display:none" onChange="setLastCh();">
						<option value="">请选择</option>
					</select>							  
					<input type="hidden" name="ch_flag" id="ch_flag" value="0" /> 
					<input type="hidden" name="ch_id_group" id="ch_id_group" />
			</td>
		</tr>
		
		<tr>
			<td align="right" width="15%">关键字:</td>
			<td colspan="3"><input name="news_key" id="news_key" size="60" maxLength="100" type="text" /></td>
		</tr>
				
		<tr>
			<td align="right" width="15%">内容摘要:</td>
			<td colspan="3">
			<textarea name="content_sub" id="content_sub" style="color:#999999;" maxLength="1000" rows="5" cols="70"></textarea></td>
		</tr>		
		
		<tr>
				<td align="right" width="15%">原作者:</td>	   
			  <td width="20%"><input name="author" id="author" type="text" maxlength="50" /></td>
			  <td width="15%" align="right">责任编辑:</td>
			  <td width="50%"><input name="editor" id="editor" type="text" maxlength="50" /></td>
	  </tr>
		
		<tr>
		  <td align="right">是否允许评论:</td>
		  <td>
		  	<input name="is_comment" type="radio" value="0" checked />可以
        <input name="is_comment" type="radio" value="1"   />不可以 
      </td>
      <td align="right" width="15%">关联商品:</td>
			<td>
				<input name="link_goods_group" id="link_goods_group" maxLength="100"type="text" />
		   </td>
		</tr>
		

		<tr>
			<td align="right" width="15%">外部链接:</td>
			<td colspan="3"><input name="out_link" id="out_link" maxLength="100" size="60" type="text" /></td>
		</tr>		
		<tr>
			<td align="right" width="15%">资讯内容<font color="red">*</font></td>
 
			<td colspan="3">
				<textarea name="content" id="content"></textarea>
				<script type="text/javascript" src="/program/plugins/ckeditor/ckeditor.js"></script>
				<script type="text/javascript">
					CKEDITOR.replace('content');
				</script>			
			</td>
		</tr>
	</table>
	
	<table width="70%" cellpadding="1" cellspacing="1" border="0">
       <td align="center">
        <input name="user_id" id="user_id" type="hidden" vslue="<%=user_id%>" />
				<input name="click_num" id="click_num" type="hidden" value="0"/>
				<input type="hidden" name="bpm_id" value="1698" />
				<input type="hidden" name="state_code" value="1" />
				<input name="news_id" id="news_id" type="hidden" value="<%=news_id%>" />
        <input class="buttoncss" type="button" name="tradeSub" value="提交" onClick="return chekedform()" />&nbsp;&nbsp;
				<input class="buttoncss" type="button" name="tradeRut" value="返回" onClick="window.location.href='index.jsp';"/>
		 </td>
		</tr>
	</table>
	</form>
</body>

</html>
